﻿using System;
using System.Linq;

    class ExchangeBits
    {
        static void Main(string[] args)
        {
            int n = 268419072;
            Console.WriteLine(Convert.ToString(n, 2));
            int mask = 7;

            int firstThreeBits = n & (mask << 3);
            int secondThreeBits = n & (mask << 24);

            firstThreeBits = firstThreeBits << 21;
            secondThreeBits = secondThreeBits >> 21;

            n = n & (~(mask << 3));
            n = n & (~ (mask << 24));
           
            n = n | firstThreeBits;
            n = n | secondThreeBits;
            Console.WriteLine(Convert.ToString(n, 2));


        }
    }

